package com.example.shushiyunsst.scan;

import android.content.Context;
import android.util.AttributeSet;


import me.dm7.barcodescanner.core.IViewFinder;
import me.dm7.barcodescanner.zxing.ZXingScannerView;

public class JssScanView extends ZXingScannerView {

    private   LatteViewFinderView latteViewFinderView  ;

    public JssScanView(Context context) {
        this(context, null);
    }

    public JssScanView(Context context, AttributeSet attributeSet) {
        super(context, attributeSet);

    }

    @Override
    protected IViewFinder createViewFinderView(Context context) {
        latteViewFinderView = new LatteViewFinderView(context);
        return latteViewFinderView;
    }


    @Override
    public void startCamera() {
        super.startCamera();
        if (latteViewFinderView!=null){
            latteViewFinderView.startAnim();

        }
    }

    @Override
    public void startCamera(int cameraId) {
        super.startCamera(cameraId);
        if (latteViewFinderView!=null){
            latteViewFinderView.startAnim();
        }


    }

    @Override
    public void stopCamera() {
        super.stopCamera();
        if (latteViewFinderView!=null){
            latteViewFinderView.cancelAnim();
        }

    }
}
